﻿#pragma once


// CModuleTreeView 视图

class CModuleTreeView : public CTreeView
{
	DECLARE_DYNCREATE(CModuleTreeView)

protected:
	CModuleTreeView();           // 动态创建所使用的受保护的构造函数
	virtual ~CModuleTreeView();

public:
#ifdef _DEBUG
	virtual void AssertValid() const;
#ifndef _WIN32_WCE
	virtual void Dump(CDumpContext& dc) const;
#endif
#endif

protected:
	CImageList	m_il;

public:
	void	Populate();
	void	PopulateModule(ck::Module* pModule, HTREEITEM hParent);

protected:
	void	DeleteAllChildItems(HTREEITEM hParent);


protected:
	DECLARE_MESSAGE_MAP()

public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMDblclk(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMRClick(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnTvnItemExpanding(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnTvnItemExpanded(NMHDR *pNMHDR, LRESULT *pResult);
	
};


